package com.netty.demo.thrift;

import com.thrift.generated.DataException;
import com.thrift.generated.Person;
import com.thrift.generated.PersonService;
import org.apache.thrift.TException;

public class PersonServiceImpl implements PersonService.Iface {
    @Override
    public Person getPersonByUsername(String username) throws DataException, TException {
        Person person = new Person();
        person.setAge(21);
        person.setUsername("agan");
        person.setMarried(false);

        return person;
    }

    @Override
    public void savePerson(Person person) throws DataException, TException {
        System.out.println(person);
    }
}
